package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyConcern;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyConcernMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyConcern record);

    StrategyConcern selectByPrimaryKey(Long id);

    List<StrategyConcern> selectAll();

    int updateByPrimaryKey(StrategyConcern record);


    Integer selectLikerNums(Long strategyId);

    Integer selectCollectorNums(Long strategyId);

    StrategyConcern selectCollectorByStrategyIdAndCollectorId(@Param("strategyId") Long strategyId,@Param("likerId") Long likerId);

    void updateByPrimaryKeyIfLikerExist(StrategyConcern temp);

    StrategyConcern selectLikerByStrategyIdAndLikerId(@Param("strategyId") Long strategyId,@Param("collectorId") Long collectorId);

    void updateByPrimaryKeyIfCollectorExist(StrategyConcern temp);

    StrategyConcern selectCollectorByStrategyIdAndLikerId(Long strategyId, Long likerId);

    void updateLikerByPrimaryKey(Long id);

    void updateCollectorByPrimaryKey(Long id);
}